#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int i,n;
    float xdeg,xrad,term,sum;
    cout<<"Enter the values of x in degree :";
    cin>>xdeg;
    cout<<"Enter the number of term n :";
    cin>>n;
    xrad=(xdeg*3.14)/180;
    term=sum=xrad;
    for(i=2;i<=n;i++)
    {
        term*=(-xrad*xrad)/((2.0*i-1)*(2.0*i-2));
        sum+=term;
    }
    cout<<"sin("<<xdeg<<")="<<sum<<endl;
    cin.get();
}
